//
//  HZBaseViewController.m
//  MyDoctor
//
//  Created by 黑眼圈 on 16/5/4.
//  Copyright © 2016年 heiyan. All rights reserved.
//基控制器

#import "HZBaseViewController.h"

@interface HZBaseViewController ()

@end

@implementation HZBaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    //设置并添加子控件
    [self setup];
    
    
}

#pragma mark -
#pragma mark    设置并添加子控件
-(void)setup{
    
    UIBarButtonItem* leftItem = [[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"home_nav_button_back"] style:UIBarButtonItemStylePlain target:self action:@selector(prese)];
    
    self.navigationItem.leftBarButtonItem = leftItem;
    
    
}


#pragma mark -
#pragma mark     实现回到上一个控制器的方法
-(void)prese{
    
    [self.navigationController popViewControllerAnimated:YES];
    
    //调用实现抽屉效果的方法
    [self.mm_drawerController toggleDrawerSide:MMDrawerSideLeft animated:YES completion:^(BOOL finished) {
        
//        NSLog(@"完毕");
    }];
}


@end
